﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/SiteMaster.Master"
    Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<%@ Import Namespace="Microhard.Framework.MVCHelper" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    发货明细汇总
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="section-header">
        <div class="title">
            <img src="<%=Url.Content("~/Content/images/ico-catalog.png")%>" alt="" />
            发货明细汇总
        </div>
        <div class="options">
        </div>
    </div>
    <table width="100%">
        <tr>
            <td class="adminTitle">
                <img alt="发货编号" src="<%=Url.Content("~/Content/images/ico-help.gif") %>" title="发货编号"></img><label
                    for="operationName" title="发货编号">发货编号</label>:
            </td>
            <td class="adminData">
                <%=Html.TextBox("queryCode") %>
            </td>
        </tr>
    </table>
    <p>
    </p>
    <table class="adminContent">
        <tr>
            <td>
                <%Html.Telerik().Grid<Microhard.WST.BI.Buz.Models.OrderPrdDetailModel>((List<Microhard.WST.BI.Buz.Models.OrderPrdDetailModel>)this.Model.Data)
                    .Name("operation-grid")
                    .ToolBar(t => t.Template(g =>
                    { %>
                <%var searchParms = new Dictionary<string, string>();
                  searchParms.Add("QueryDeliveryCode", "queryCode");
                %>
                <div class="header-menu">
                    <ul class="t-widget t-reset t-header t-menu">
                        <li class="t-item  t-state-default">
                            <%=Html.Authorized_SearchButton("btnSearch", "查询", "operation-grid", searchParms, "OperationGridOnGridDataBinding")%>
                        </li>
                    </ul>
                </div>
                <%}))
                         .ClientEvents(events => events.OnDataBinding("OperationGridOnGridDataBinding"))
                         .Columns(columns =>
                    {
                        columns.Bound(x => x.PrdOrderID)
                       .Template(x => Html.CheckBox("checkedRecords", new { value = x.PrdOrderID, @class = "gridCks" }))
                       .ClientTemplate("<input type='checkbox' name='checkedRecords' value='<#= PrdOrderID #>' class='gridCks'/>")
                     .HtmlAttributes(new { style = "text-align:center" }).Title("选择");

                        columns.Bound(x => x.Order.DeliveryCode).Title("发货编号");
                        columns.Bound(x => x.Order.CreationDate).Title("发货日期").Format("yyyy-MM-dd");
                        columns.Bound(x => x.Order.RegInfo.Customer.Province).Title("省份");
                        columns.Bound(x => x.Order.RegInfo.Customer.City).Title("城市");
                        columns.Bound(x => x.Order.CreatorName).Title("客服人员");
                        columns.Bound(x => x.Order.RegInfo.Customer.Name).Title("客户名称");
                        columns.Bound(x => x.name).Title("品规");
                        columns.Bound(x => x.DeliveryCount).Title("数量");
                        columns.Bound(x => x.Type).Title("发货类型");
                        columns.Bound(x => x.pm).Title("到款单");
                    })
                      .Pageable(settings => settings.Total(Model.Total).PageSize(Html.GetGridPageSize()).Position(GridPagerPosition.Top))
                      //绑定搜索按钮，执行对应的action
                    .DataBinding(dataBinding => dataBinding.Ajax().Select("_List", "OrderPrdDetail"))
                    .EnableCustomBinding(true)
                    .Render();
                %>
            </td>
        </tr>
    </table>
</asp:Content>
